package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysUserChatRelMapper;
import com.ruoyi.system.domain.SysUserChatRel;
import com.ruoyi.system.service.ISysUserChatRelService;

/**
 * 系统用户与业务用户关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-30
 */
@Service
public class SysUserChatRelServiceImpl implements ISysUserChatRelService 
{
    @Autowired
    private SysUserChatRelMapper sysUserChatRelMapper;

    /**
     * 查询系统用户与业务用户关联
     * 
     * @param id 系统用户与业务用户关联主键
     * @return 系统用户与业务用户关联
     */
    @Override
    public SysUserChatRel selectSysUserChatRelById(Long id)
    {
        return sysUserChatRelMapper.selectSysUserChatRelById(id);
    }

    /**
     * 查询系统用户与业务用户关联列表
     * 
     * @param sysUserChatRel 系统用户与业务用户关联
     * @return 系统用户与业务用户关联
     */
    @Override
    public List<SysUserChatRel> selectSysUserChatRelList(SysUserChatRel sysUserChatRel)
    {
        return sysUserChatRelMapper.selectSysUserChatRelList(sysUserChatRel);
    }

    /**
     * 新增系统用户与业务用户关联
     * 
     * @param sysUserChatRel 系统用户与业务用户关联
     * @return 结果
     */
    @Override
    public int insertSysUserChatRel(SysUserChatRel sysUserChatRel)
    {
        sysUserChatRel.setCreateTime(DateUtils.getNowDate());
        return sysUserChatRelMapper.insertSysUserChatRel(sysUserChatRel);
    }

    /**
     * 修改系统用户与业务用户关联
     * 
     * @param sysUserChatRel 系统用户与业务用户关联
     * @return 结果
     */
    @Override
    public int updateSysUserChatRel(SysUserChatRel sysUserChatRel)
    {
        sysUserChatRel.setUpdateTime(DateUtils.getNowDate());
        return sysUserChatRelMapper.updateSysUserChatRel(sysUserChatRel);
    }

    /**
     * 批量删除系统用户与业务用户关联
     * 
     * @param ids 需要删除的系统用户与业务用户关联主键
     * @return 结果
     */
    @Override
    public int deleteSysUserChatRelByIds(Long[] ids)
    {
        return sysUserChatRelMapper.deleteSysUserChatRelByIds(ids);
    }

    /**
     * 删除系统用户与业务用户关联信息
     * 
     * @param id 系统用户与业务用户关联主键
     * @return 结果
     */
    @Override
    public int deleteSysUserChatRelById(Long id)
    {
        return sysUserChatRelMapper.deleteSysUserChatRelById(id);
    }
}
